import fetch from "@/fetch";

// 获取赛项资源详情
export const getResourceDetails = (params) => {
  return fetch({
    method: "get",
    url: "/resource/getResourceDetails",
    params,
    loading: true,
  });
};

// pdf和视频存档
export const statisticBackup = (params) => {
  return fetch({
    method: "get",
    url: "/statistic/backup",
    params,
  });
};

// 更新pdf和视频记录
export const statisticLearnTime = (params) => {
  if (params.totalTime != "NaN") {
    return fetch({
      method: "post",
      url: "/statistic/learnTime",
      data: params,
    });
  }
};

// 案例分析题记录接口
export const insertUpdateCase = (params) => {
  return fetch({
    method: "post",
    url: "/resource/insertUpdateCase",
    data: params,
  });
};
